﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SZJT.Framework.Adapter;

namespace SZJT.Framework.Services.Core
{
    /// <summary>
    /// 应用系统日志
    /// </summary>
    public class LogHelper
    {
        /// <summary>
        /// 需要写入日志的DataType
        /// </summary>
        private string DataTypeList
        {
            get { return System.Configuration.ConfigurationManager.AppSettings["DataType"]; }
        }

        /// <summary>
        /// 是否写日志 
        /// </summary>
        /// <param name="dataType"></param>
        /// <returns></returns>
        private bool IsWriteLog(string dataType)
        {
            return DataTypeList.Contains(dataType) && !string.IsNullOrEmpty(dataType);
        }
        /// <summary>
        /// 写入日志
        /// </summary>
        /// <returns></returns>
        public bool WriteLog(string userID,string taskGuid,string dataGuid,string xmlData)
        {
            //string componentGuid = "";
            //string taskGuid = "";
            //IAdapter adapter = AdapterFactory.GetAdapter(componentGuid,taskGuid);
            //adapter.SetData("", "", "", null);
            return true;
        }
    }
}
